.TH E1432_DSP_EXEC_QUERY 3 E1432
\fB---- NOT FOR GENERAL USE ----\fR
.SH NAME
.nf
e1432_dsp_exec_query \- Send commands, receive responses from SCA DSP(s)
.fi
.IX e1432_dsp_exec_query(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_dsp_exec_query(E1432ID hw, SHORTSIZ16 ID,
                     LONGSIZ32 exec_cmd,
                     LONGSIZ32 exec_data_size, LONGSIZ32 *exec_data,
                     LONGSIZ32 query_data_size, LONGSIZ32 *query_data)
.cE
.SH DESCRIPTION
\fIe1432_dsp_exec_query\fR sends commands and optional data to an individual
SCA DSP or a group of SCA DSPs and optionally reads the response(s).

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained by a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIexec_cmd\fR is the host interrupt vector that will be sent in
conjunction with the command data.

\fIexec_data_size\fR is the size of the command data block to be sent.
If it is zero or \fIexec_data\fR is NULL, no command data will be sent.

\fIexec_data\fR is a pointer to the 32 bit command data.

\fIquery_data_size\fR is the number of words of response expected from each
DSP after the command executes.
If it is zero or \fIquery_data\fR is NULL, no response will be expected.

\fIquery_data\fR is a pointer to the 32 bit an array which will receive the
response data.  It must be long enough to include the responses from all
DSPs in \fIID\fR, that is its size in 32 bit words must be at least
\fIquery_data_size\fR * number of DSPs addressed.

For \fIE1433\fR input channels, \fIexec_data\fR is first optionally sent
across the host data port.  Then \fIexec_cmd\fR is sent to the the 
host interrupt vector port.  Execution then waits for the \fICIP\fR
(Command In Progress) bit to be cleared from the DSP.  Then, the
\fIquery_data\fR is optionally read through the host data port.
This is repeated for each channel in \fIID\fR, since there is
one DSP per channel.

This function is not currently implemented for any other SCA DSPs.

.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
\fB_NO_ID\fR, if \fIID\fR is not a valid channel or group ID.
\fB_BUS_ERROR\fR, if any of the underlying register accesses fail.
\fB_BUFFER_TOO_SMALL\fR, if the buffer requirements of \fIexec_data\fR
and \fIquery_data\fR exceeds the fixed internal buffer.
\fB_SCA_FIRMWARE_ERROR\fR and \fB_SCA_HOSTPORT_FAIL\fR are symptomatic of
the command failing on the DSP or the wrong amount of response data being
expected.
.SH "SEE ALSO"
.na
e1432_sca_dsp_download
.ad
